<?php


define('ROOT_PATH', dirname(__DIR__));
define('APPLICATION_PATH', ROOT_PATH . '/application');
define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));


set_include_path(implode(PATH_SEPARATOR, array(
    ROOT_PATH . '/library'
)));

/** Zend_Application */
require_once 'Zend/Application.php';

/** \pl\nweb\editor\autoloader\Autoloader */
require_once  '../src/pl/nweb/editor/autoloader/autoloader.php';

// Definiujemy katalog źródeł
\pl\nweb\editor\autoloader\Autoloader::setSourceDir(
    ROOT_PATH . '/src'
);

// Rejestrujemy autoloader
\pl\nweb\editor\autoloader\Autoloader::register();

// Uruchamiamy Zend'a
$application = new Zend_Application(
    APPLICATION_ENV,
    include_once APPLICATION_PATH . '/configs/application.php'
);

$application->bootstrap()
            ->run();